package org.mspring.mlog.entity;

import java.util.Date;
import org.mspring.nbee.db.annotation.AutoIncrement;
import org.mspring.nbee.db.annotation.Col;
import org.mspring.nbee.db.annotation.Id;
import org.mspring.nbee.db.annotation.Mappable;
import org.mspring.nbee.db.entity.BaseEntity;
import org.mspring.nbee.db.orm.EntityField;

/**
 *
 * @author Gao Youbo
 * @since 2016-06-05 10:10:14
 */
@Mappable
public class LinkEntity extends BaseEntity {

    @Id
    @AutoIncrement
    @Col(length = 19)
    private Long id;
    @Col(nullable = false, length = 32)
    private String name;
    @Col(nullable = false, length = 1024)
    private String url;
    @Col(length = 1024)
    private String description;
    @Col(nullable = false, length = 19)
    private Date createTime;
    @Col(nullable = false, length = 19)
    private long createUser;
    @Col(nullable = false, length = 32)
    private String createUserName;
    @Col(nullable = false, length = 19)
    private Date updateTime;
    @Col(nullable = false, length = 19)
    private long updateUser;
    @Col(nullable = false, length = 32)
    private String updateUserName;

    public Long getId() {
        return this.id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return this.name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getUrl() {
        return this.url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getDescription() {
        return this.description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public Date getCreateTime() {
        return this.createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public long getCreateUser() {
        return this.createUser;
    }

    public void setCreateUser(long createUser) {
        this.createUser = createUser;
    }

    public String getCreateUserName() {
        return this.createUserName;
    }

    public void setCreateUserName(String createUserName) {
        this.createUserName = createUserName;
    }

    public Date getUpdateTime() {
        return this.updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public long getUpdateUser() {
        return this.updateUser;
    }

    public void setUpdateUser(long updateUser) {
        this.updateUser = updateUser;
    }

    public String getUpdateUserName() {
        return this.updateUserName;
    }

    public void setUpdateUserName(String updateUserName) {
        this.updateUserName = updateUserName;
    }

    public static class Fields {
        public static final EntityField id = new EntityField("id", "id", Long.class, 19, false);
        public static final EntityField name = new EntityField("name", "name", String.class, 32, false);
        public static final EntityField url = new EntityField("url", "url", String.class, 1024, false);
        public static final EntityField description = new EntityField("description", "description", String.class, 1024, true);
        public static final EntityField createTime = new EntityField("createTime", "create_time", Date.class, 19, false);
        public static final EntityField createUser = new EntityField("createUser", "create_user", long.class, 19, false);
        public static final EntityField createUserName = new EntityField("createUserName", "create_user_name", String.class, 32, false);
        public static final EntityField updateTime = new EntityField("updateTime", "update_time", Date.class, 19, false);
        public static final EntityField updateUser = new EntityField("updateUser", "update_user", long.class, 19, false);
        public static final EntityField updateUserName = new EntityField("updateUserName", "update_user_name", String.class, 32, false);
    }
}
